/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.easoft.code.pos.ui.leftoptions.impl;

import com.easoft.code.pos.data.pojos.PosSerieFactura;
import com.easoft.code.pos.ui.beans.FormDataEntry;
import com.easoft.code.pos.ui.beans.FormDataEntryManager;
import com.easoft.code.pos.ui.controllers.DataEntryController;
import com.easoft.code.pos.ui.controllers.impl.CajasControllerImpl;
import com.easoft.code.pos.ui.controllers.impl.ImpresorasControllerImpl;
import com.easoft.code.pos.ui.leftoptions.ComponentBuilder;
import java.util.Arrays;
import java.util.LinkedList;
import java.util.List;
import javax.swing.JPanel;

/**
 *
 * @author Eliu
 */
public class ConfiguracionesMaintenancesImpl implements ComponentBuilder {

    @Override
    public JPanel build() {
        return new FormDataEntryManager(genDataEntryList(), "maintenance-menu.png");
    }

    private List<FormDataEntry> genDataEntryList() {
        List<FormDataEntry> des = new LinkedList<>();
        des.add(new FormDataEntry(
                new DataEntryController(
                        Arrays.asList(new String[]{"No. Resolucion", "Descripcion",
                            "No. Inicio", "No. Final"}),
                        Arrays.asList(new String[]{"NoResolucion", "Descripcion",
                            "NoInicio", "NoFinal"}), PosSerieFactura.class), "Resoluciones Facturas"));
        des.add(new FormDataEntry(
                new ImpresorasControllerImpl(), "Impresoras"));
        des.add(new FormDataEntry(
                new CajasControllerImpl(), "Cajas"));
        return des;
    }

    @Override
    public String getName() {
        return "Configuraciones";
    }
}
